# coding:utf-8
from PyQt6.QtCore import Qt
from qfluentwidgets import MessageBox, CheckBox


class UnloadDialog(MessageBox):
    def __init__(self, parent=None):
        super().__init__(
            title="警告",
            content="你确定要卸载插件吗？\n卸载后将无法恢复！",
            parent=parent
        )
        self.checkBox = CheckBox("", self.widget)

        self.textLayout.addWidget(self.checkBox, 0, Qt.AlignmentFlag.AlignLeft)

    def isChecked(self):
        return self.checkBox.isChecked()

    def setTittle(self, title: str):
        self.titleLabel.setText(title)

    def setContent(self, content: str):
        self.contentLabel.setText(content)

    def setCheckBoxText(self, text: str):
        self.checkBox.setText(text)